var onConfirmDelete = function(btn) {
	if (btn == 'yes') {
		var treePanel =  Ext.getCmp('companyTreePanel');		
		treePanel.el.mask('Deleting...', 'x-mask-loading');
		var selNode = treePanel.getSelectionModel().getSelectedNode();
		
		Ext.Ajax.request({
			url    : 'distributor/deleteElement',
			params : {
				node: selNode.id
			},
			success: function(response, opts) {  
				treePanel.el.unmask();
				var responseJson = Ext.decode(response.responseText);
				if (responseJson.success === "true") {
					selNode.remove();
				}
				else {
					Ext.Msg.alert('An error occured with the server.');
				}
			}
		});
	}
}